package com.luokangtao.user;

import com.luokangtao.common.util.IdWorker;
import com.luokangtao.common.util.JwtUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author luokangtao
 * @create 2019-07-22 21:01
 */
@EnableTransactionManagement
@SpringBootApplication(scanBasePackages = {"com.luokangtao"})
@EnableEurekaClient
@EnableSwagger2
public class UserApplicaition {

    public static void main(String[] args) {
        SpringApplication.run(UserApplicaition.class,args);
    }

    //ideworker分布式id
    @Bean
    public IdWorker idWorker(){
        //初始化参数随便写
        return new IdWorker(1,1);
    }

}
